#include "ThreadPool.h"

int epollAdd(int epfd,int fd){
    struct epoll_event event;
    event.events=EPOLLIN;//监听时间为写入
    event.data.fd=fd;
    int ret=epoll_ctl(epfd,EPOLL_CTL_ADD,fd,&event);
    if(ret==-1){
        error(1,errno,"epoll_ctl add is error\n");
    }
    return 0;
}
int epollDel(int epfd,int fd){
    int ret=epoll_ctl(epfd,EPOLL_CTL_DEL,fd,NULL);
    if(ret==-1){
        error(1,errno,"epoll del is error\n");
    }
    return 0;
}
